package com.duqc.web.controller;

import com.duqc.web.service.RetryableService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName RetryableController
 * @Description 重试功能
 * @Author duqc
 * @Date 2023/3/20
 **/
@RestController
@RequestMapping("retryable")
@RequiredArgsConstructor
public class RetryableController {

    private final RetryableService retryableService;

    @GetMapping("demo")
    public String demo(int code) throws Exception {
        return this.retryableService.demo(code);
    }

}
